// 1.引入http模块
const http = require('http');
const fs = require('fs');

const server = http.createServer((req, res) => {
  // 读取文件内容
  let html = fs.readFileSync('./assets/table.html');
  res.end(html)
});

server.listen(9000, () => {
  console.log('服务器启动成功');
});